package com.bdzl.daoRepository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.bdzl.pojo.Disease;

public interface DiseaseDao  extends JpaRepository<Disease, Integer> {

	List<Disease> findByTypeAndState(Integer i, Integer j);

	
	@Modifying
	@Query(" update Disease set state = 0 where id = :id ")
	void upddis(@Param("id")Integer diseaseId);


	@Modifying
	@Query(" update Disease set name = :name where id = :id ")
	void upddisname(@Param("id")Integer diseaseId,@Param("name") String diseaseName);

}
